package com.example.fengsam.aidong.utils;

import android.content.Context;
import android.util.DisplayMetrics;

/**
 * Created by fengsam on 17-9-20.
 */

public class Screen {

    //用于获取屏幕大小,true为获取屏幕宽度,false为获取屏幕高度
    public static int getScreen(boolean b,Context aty) {
        DisplayMetrics dm = aty.getResources().getDisplayMetrics();
        if (b)
        return dm.widthPixels;
        return dm.heightPixels;
    }
}
